<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Homework Status</title>
<style type="text/css">
   .type0{color:#FF0000;}
   .type1{color:#000000;}  
   .table1{border-width:1px;border-style:solid;border-color:#000000}
   td{width:80px;text-align:right}
</style>
</head>
<body>
<%file=File.open("a.txt")%>
<table class="table1">
<%line=file.readline%>
<tr>
<%tokens=line.split("\t")%>
<%tokens.each do |token|%>
<td>
<%=token%>
</td>
<%end%>
</tr>
<%file.each_line do |line|%>
<tr>
<%tokens=line.split("\t").reverse%>
<td>
<%=tokens.pop%>
</td>
<%while tokens.size>0%>
<%score=tokens.pop.to_i %>
<%if score>0%> 
<%style=1%>
<%else%>
<%style=0%>
<%end%>
<td class="type<%=style%>">
<%=if score>0 then score else "N/A" end%>
</td>
<%end%>
</tr>
<%end%>
</table>
<%file.close%>
<%=Time.now%>
</body>
</html>
